home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 38 / Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso / -seriously_amiga- / programming / other / esa / examples / sss / code / data.i next >
Text File  |  1999-01-25  |  3KB  |  80 lines

  1. *******************************************************************************
  2. * data v1.2.1
  3. *******************************************************************************
  4.  
  5.     section    MiscData,DATA
  6.  
  7. *******************************************************************************
  8. * variables
  9.  
  10.     cnop    0,4
  11. _DOSBase    dc.l    0
  12. _StdOut    dc.l    0    ;standard output handle
  13.  
  14. WrkBufAdr    dc.l    0    ;work buffer adr
  15. WrkBufLen    dc.l    0    ;work buffer length
  16. ChnkSize    dc.l    0    ;chunk length
  17. InFileHnd    dc.l    0    ;source file handle
  18. InFileSze    dc.l    0    ;size of source file
  19. ExtnAdr    dc.l    0    ;ptr to extension
  20. MaxChnk    dc.l    0    ;highest chunk #
  21. DgtNmb    dc.l    0    ;min necessary length of extension
  22.  
  23. flags    dc.b    0    ;see defs.i for bit allocations
  24.  
  25. *******************************************************************************
  26. * tables
  27.  
  28.     cnop    0,4
  29. ErrTab    dc.l    txt_AllDne,txt_LowMem,txt_SouFle
  30.     dc.l    txt_ChnkSz,txt_DstFle,txt_ChnkNb
  31.     dc.l    txt_UsrBrk
  32.  
  33. *******************************************************************************
  34. * texts
  35.  
  36. _DOSName    dc.b    "dos.library",0
  37.  
  38. txt_vers    dc.b    "$VER: sss v1.1 (20.11.1998)",0
  39. txt_title    dc.b    10,"›1msss v1.1›0m (20.11.1998) - © 1998 Simone Bevilacqua",10,10,0
  40. txt_InfoArrow    dc.b    " -> ",0
  41. txt_InfoBytes    dc.b    " bytes"
  42. txt_ENTER    dc.b    10,0
  43. txt_writing    dc.b    13,"writing          : ",0
  44. txt_InfoFName    dc.b    "source file name : ",0
  45. txt_InfoFSize    dc.b    "source file size : ",0
  46. txt_InfoOFile    dc.b    "chunks file names: ",0
  47. txt_InfoCSize    dc.b    "chunks size      : ",0
  48. txt_InfoBSize    dc.b    "buffer size      : ",0
  49.  
  50. txt_error    dc.b    "ERROR: ",0
  51. txt_AllDne    dc.b    "all done!",10,10,0
  52. txt_LowMem    dc.b    "not enough memory!",10,0
  53. txt_SouFle    dc.b    "can't read from source file",10,0
  54. txt_DstFle    dc.b    "can't write to destination",10,0
  55. txt_ChnkSz    dc.b    "wrong chunk size",10,0
  56. txt_ChnkNb    dc.b    "too many chunks (max. 10000)!",10,0
  57. txt_UsrBrk    dc.b    "***Break",10,0
  58. txt_UsgHlp    dc.b    "  ›1mSYNTAX›0m",10,10
  59.     dc.b    "    sss [›1m-q›0m] ›1mInputFile ChunkSize ›0m[›1mOutBase›0m]",10,10
  60.     dc.b    "  ›1mARGS›0m",10,10
  61.     dc.b    "    ›1m-q       ›0m = quiet mode: don't print any message",10
  62.     dc.b    "    ›1mInputFile›0m = name of the file to split",10
  63.     dc.b    "    ›1mChunkSize›0m = size in bytes of each chunk",10
  64.     dc.b    "                (0 < ChunkSize < $7fffffff = 2,147,483,647)",10
  65.     dc.b    "    ›1mOutBase›0m   = output files will be called ›1mOutBase›0m.x",10
  66.     dc.b    "                (000 <= x <= 99,999; by default ›1mOutBase›0m = ›1mInputFile›0m)",10,10
  67.     dc.b    "  ›1mNOTE›0m",10,10
  68.     dc.b    "    execution can be stopped by pressing ›1mCTRL-C›0m anytime",10,10,0
  69.  
  70. *******************************************************************************
  71. * buffers
  72.  
  73.     section    bufs,BSS
  74. InFile    ds.b    1024    ;file to split
  75. OutBase    ds.b    1024
  76. CmdLn    ds.b    514    ;command line string
  77.  
  78.     cnop    0,4
  79. TmpBuf    ds.b    256
  80.